package com.zj.core.ui

import android.support.v7.widget.RecyclerView
import android.view.ViewManager
import android.widget.LinearLayout
import com.zj.core.R
import org.jetbrains.anko.backgroundColor
import org.jetbrains.anko.custom.ankoView

class HelpMessageUi(groupView: LinearLayout){
    var template_list_rv:RecyclerView?=null
    private var view: LinearLayout =groupView

    init {
        template_list_rv=view.recyclerview{
            id= R.id.template_list_rv
            backgroundColor=resources.getColor(R.color.colorsFrenchWhite)
            layoutParams= LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT)
        }
    }

    inline fun ViewManager.recyclerview(theme: Int = 0, init: RecyclerView.() -> Unit) : RecyclerView {
        return ankoView({ RecyclerView(it) }, theme, init)
    }
}